package com.metaapp.image.base

import com.metaapp.image.api.ImageApi
import retrofit2.Retrofit
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory

/**
 * Created by huangshengsen on 2020/8/11.
 */
object NetApiProvider {
    val retrofit = Retrofit.Builder()
        .baseUrl("https://image.so.com/")
        .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
        .addConverterFactory(GsonConverterFactory.create())
        .build()

    fun newImageApi(): ImageApi {
        return retrofit.create(ImageApi::class.java)
    }
}